#ifndef CONFIG_H
#define CONFIG_H

#include "Nano100Series.h"
#include "Common.h"

// 0~100
struct contrast {
	uint8_t w;
	uint8_t r;
	uint8_t g;
	uint8_t b;
};

struct brightness {
	uint8_t w;
	uint8_t r;
	uint8_t g;
	uint8_t b;
};

struct saturation {
	uint8_t w;
	uint8_t r;
	uint8_t g;
	uint8_t b;
};

// 4 bytes aligin!
struct hg_config {
	uint32_t version;
	
	// verison 1
	struct brightness tBrightness;
	struct contrast tContrast;
	struct saturation tSaturation;
	
	// version 2
	int32_t brightnessOffset;	// Rbr - Lbr : [-100:100]
	
	// version 3
	
	uint32_t reserved;
};

extern struct hg_config tHgConfig;

void HgConfigRead(struct hg_config *tHgConfig);
void HgConfigWrite(struct hg_config *tHgConfig);
void HgConfigInit(void);

#endif

